Arduino Atomic Clock

What is WWVB?

WWVB is 60Khz carrier signal that broadcasts the current time from Fort Collins Colorado. The antennas broadcasting the signal have been running nearly continuously since 1965.
The signal is remarkably slow, transmitting only 1 bit per second. With 60 bits in the message it takes a full minute to receive the time.

70 KW towers located in Fort Collins Colorado.

wpid-file-wwvb_antenna-2010-05-26-01-101.jpg

Image http://en.wikipedia.org/wiki/WWVB

Receiving the signal

The part you will need to buy / salvage to receive the WWVB signal is the CMMR-6P-60. It is available from Digikey 561-1014-ND. Note that there is also a 40 kHz and a 77 kHz variant. If you live in the united states, you want the 60 kHz module.

For only $2 more, you can buy a bigger antenna. 561-1001-ND. Unless you live in Colorado, those will be $2 very well spent.

wpid-wpid-screen-shot-2010-05-26-at-12-37-44-am-2010-05-26-01-10-2010-05-26-01-101.png

Hooking it up

See the data sheet for full instructions. Basically to get it working, you need to connect “PON” to Ground, and connect “TCO” to your micro controller. Optionally connect an LED to “TCON” to visualize the actual bits coming in.

Connect the TCO to pin 2 on the arduino,

Connect a led to pin 13 of the arduino.

wpid-wwvb-2010-05-26-01-101.png

Writing the Code

Head over to github to get the arduino sketch. Thanks goes to vinmarshal for his excellent work on this.

https://github.com/spudstud/WWVB-Clock

You will notice that there is simulator sketch which you can load on another arduino to simulate the wwvb module. This comes in handy if you live far away from colorado or are only able to pick up the radio signal at night. Upload the simulator code to a second arduino, and connect it to pin 2.

Once you get the board powered up, you should see the led on the wwvb module blinking like crazy. That is because of interference. Remember wwvb has a transmit rate of one bit per second, so the led should be blinking very slowly. I can’t emphasize enough how susceptible the radio is to interference. I can only get a good connection if all nearby electronics are turned off. (Especially my plasma tv). Frequently I would be getting a good steady transmission until my roommate would walk in to the room with his macbook pro. I’d have to wait until he would leave to get a good transmission again.

Once you finally get a full 60 bits without corruption, the led on pin 13 of the arduino should light up for 10 seconds.

wpid-wpid-screen-shot-2010-05-26-at-12-24-15-am-2010-05-26-01-10-2010-05-26-01-101.png

Final Considerations

-The wwvb code is pretty basic. Additional features / bug fixes are welcome.

-Don’t expect a successful transfer very often. Updates are most likely to happen late at night because radio waves travel further on earth at night.

-Power supply is important.  The ripple caused by cheap power supplies is death for sensitive signals. Genuine Apple iPhone chargers work best for me.

Measure your distance from the antennas here

Credits go to duinolab.blogspot.com for his tutorial.

The Github code first appeared in popular science http://www.popsci.com/diy/article/2010-03/build-clock-uses-atomic-timekeeping

Links

Popular Mechanics Clock

Salvaging a WWVB Modual

Arduino Forum

Arduino Forum 2

561-1014-ND

561-1001-ND.

Github

http://www.nist.gov/pml/div688/grp40/wwvb.cfm

About spuder
spuder is a "super computer" support engineer by day, and tinkerer / hobbyist by night.

One Response to Arduino Atomic Clock

  1. Pingback: How to build a WWVB receiver? - KB6NU's Ham Radio Blog

Leave a comment